package cn.kgc.javaweb.dao;

import cn.kgc.javaweb.entity.User;
import cn.kgc.javaweb.vo.UserVO;

import java.sql.SQLException;
import java.util.List;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/5/15
 * @Description: crud
 */
public interface UserDao {

    User  selectByUserName(String username);

    Integer registerUser(String username, String password);

    Integer updateUser(User user);

    void updatePwd(String username, String newPassword) throws SQLException;

    List<UserVO> getList(Integer start, Integer limit) throws SQLException;

    Long getTotal() throws SQLException;

    void addUser(User user) throws SQLException;

    void updateUserByRoot(User user) throws SQLException;

    void deleteBatch(String[] ids);

    List<User> selectByRoleId(Integer id);
}
